home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 90 / CD Actual 90.iso / Software3D / K-3D / k3d-0.4.2.1 / shaders / k3d_fakesky.sl < prev    next >
Encoding:
Text File  |  2004-07-23  |  365 b   |  13 lines

  1. /*
  2.  * fakesky.sl
  3.  *
  4.  * Shader a la const that slaps a fixed blue color up on the top half of a
  5.  * sphere, with color varying a bit by altitude, in an attempt to mimic the
  6.  * clear sky.
  7.  */
  8.     
  9. surface k3d_fakesky(vector up = (0,0,1); color skycolor = (.5, .6, 1.)) {
  10.     Oi = Os;
  11.     Ci = Os * (.5 + .5 * max(0., (up . normalize(N)))) * 1.8 * skycolor;
  12. }
  13.